{% extends 'base.html' %}
{% block title %}舌照质量筛选-大便典型{% endblock %}
{% block css_and_js -%}
{{ super() }}
    <style>
        body {text-align: center}
        .row {margin-top: 10px; margin-bottom: 10px}
        [class|="col"] {padding-top: 10px; padding-bottom: 10px}
        .panel-heading {font-size: 200%}
        .btn {width: 100px}
        {%- if not data['feature_6_is_normal'] %}.feature_6 {color: #a94442; font-weight: bold}{% endif %}
        {%- if not data['feature_7_is_normal'] %}.feature_7 {color: #a94442; font-weight: bold}{% endif %}
    </style>
    <script>
        document.onkeypress = function(event) {
            switch (event.key) {
                case "f": {open("{{ url_for('.confirm', page='typical', typical=0) }}", "_self"); break;}
                case "j": {open("{{ url_for('.confirm', page='typical', typical=1) }}", "_self"); break;}
            }
        };
    </script>
{% endblock %}
{% block nav %}
    <div class="navbar navbar-inverse" role="navigation" style="margin-bottom: 0">
        <div class="container">
            <div class="navbar-header navbar-brand">舌照质量筛选</div>
            <div class="navbar-header navbar-brand" style="margin-left: 5em">{{ data['file_name'] }}.jpg</div>
            <div class="navbar-right navbar-brand" style="margin-right: 2em">#{{ data['id'] }}</div>
        </div>
    </div>
{%- endblock %}
{% block main %}
    <div class="row">
        <div class="col-sm-6" style="border-right: 1px solid lightgray">
            <div class="text-right">
                <img src="{{ url_for('.image', file_name=data['file_name']) }}" class="img-rounded" style="height: 600px">
            </div>
        </div>
        <div class="col-sm-3">
            {%- if data['feature_6_is_normal'] and data['feature_7_is_normal'] %}
            <div class="panel panel-success">
                <div class="panel-heading">正常</div>
            {% else %}
            <div class="panel panel-danger">
                <div class="panel-heading">不正常</div>
            {% endif -%}
                <div class="panel-body">
                    <h1 class="feature_6">大便性状</h1>
                    <h2 class="feature_6">{{ data['feature_6'] }}</h2>
                    <h1 class="feature_7">大便频率</h1>
                    <h2 class="feature_7">{{ data['feature_7'] }}</h2>
                </div>
                <div class="panel-footer">
                    <a class="btn btn-success btn-lg" href="{{ url_for('.confirm', page='typical', typical=0) }}">好(F)</a>
                    <a class="btn btn-danger btn-lg" href="{{ url_for('.confirm', page='typical', typical=1) }}">坏(J)</a>
                </div>
            </div>
        </div>
    </div>
{% endblock %}